<?php
if (!defined('BASEPATH')) exit('No direct script access allowed');
function generateSalt($max = 5) {
		$characterList = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%&*?";
		$i = 0;
		$salt = "";
		while ($i < $max) {
			$salt .= $characterList{mt_rand(0, (strlen($characterList) - 1))};
			$i++;
		}
		return $salt;
}
function generatePassword($password, $salt = ''){
	return md5(md5($password).$salt);
}
